public class Main {
    public static void main(String[] args) {
        try {
            throw new NullPointerException();
        } catch (RuntimeException e) {
            System.out.println("捕获运行时异常");
            e.printStackTrace();
        } catch (NullPointerException e) {
            System.out.println("捕获空指针异常");
        }
    }
}
